<template>
<div class="main_header">
  <img :src="header_src" alt="头部加载" class="header_img">
  <div style="flex: 1;"></div>
  <div class="header_text">
    数据分析平台
  </div>
  <div class="input_box">
    <div class="input">
      <div class="icon" @click="input"><svg t="1615122812332" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2146" width="200" height="200"><path d="M431.616 791.04c-209.408 0-379.904-170.496-379.904-379.904S222.208 31.232 431.616 31.232 811.52 201.728 811.52 411.136 641.024 791.04 431.616 791.04z m0-693.248c-172.544 0-313.344 140.288-313.344 313.344 0 172.544 140.288 313.344 313.344 313.344 172.544 0 313.344-140.288 313.344-313.344 0-172.544-140.8-313.344-313.344-313.344z" fill="#707070" p-id="2147"></path><path d="M676.864 660.48l278.528 278.528c12.8 12.8 12.8 34.304 0 47.104-12.8 12.8-34.304 12.8-47.104 0L629.76 707.584c-12.8-12.8-12.8-34.304 0-47.104 12.8-12.8 34.304-12.8 47.104 0z" fill="#707070" p-id="2148"></path></svg></div>
      <input type="text" @keydown.enter="input" v-model="search">
    </div>
  </div>
</div>
</template>

<script>
import header from '@/assets/header.png'
export default {
  name: "index",
  props:{
    info:String
  },
  data(){
    return{
      header_src:header,
      search:this.search
    }
  },
  methods:{
    input(){
      this.$emit('search',this.search)
    }
  },
}
</script>

<style scoped lang="scss">
.main_header{
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;
  .header_img{
    bottom: 0;
    width: 100%;
    position: absolute;
    background-size: cover;
  }
  .header_text{
    flex: 2;
    width: 100%;
    height: 100%;
    color: #1a95a4;
    font-size: 2rem;
    font-weight: bold;
    font-family: "PingFang HK";
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .input_box{
    flex: 1;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    .input{
      position: relative;
      margin-left: 20px;
      input{
        width: 100%;
        border: 2px solid #0b525b;
        border-radius: 7px;
        text-indent: 25px;
        outline: none;
        background-color: transparent;
        color: #0b525b;
        transform: translateY(-5px);
        transition: all ease 0.3s;
      }
      input:focus,input:hover{
        color: #24d2e9;
        border: 2px solid #1a95a4;
      }
    .icon{
      top: -1px;
      margin-left: 4px;
      position: absolute;
      width: 15px;
      height: 15px;
      &:hover{
        cursor: pointer;
      }
    }
    }
  }
}
</style>
